package br.com.financeiro.controllers;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Component;

import br.com.financeiro.dominio.TipoConta;
import br.com.financeiro.services.CrudService;

@Component
public class TipoContaMBean extends CrudMBean<TipoConta>{
	
	public TipoContaMBean(){
		obj = new TipoConta();
	}
	
	@Override
	protected String getDir() {
		return "/pages/tipo_conta";
	}
	
	@Autowired
	protected void setService(CrudService<TipoConta> service){
		super.setService(service);
	}
	
	@Override
	@Secured("ROLE_ADMIN")
	public String novo(){
		obj = new TipoConta();
		return super.novo();
	}

}
